
import matplotlib.pyplot as plt

import numpy as np
import pandas as pd


import os, sys

from sklearn.metrics import roc_auc_score

datalib_path = os.path.abspath('..')
sys.path.append(datalib_path)

lgbcsv = pd.read_csv(datalib_path+'/user_data/submission_lgb2.csv')
cbcsv = pd.read_csv(datalib_path+'/user_data/submission_cb2.csv')
df = cbcsv.copy()

df.loc[lgbcsv['ret']>0.45,'ret']+=0.25
df.loc[lgbcsv['ret']<0.3,'ret']-=0.1
df.loc[cbcsv['ret']>0.4,'ret']+=0.1
df.loc[cbcsv['ret']<0.2,'ret']-=0.15

df.loc[(cbcsv['ret']>0.4) & (lgbcsv['ret']>0.45),'ret']+=0.15


df.to_csv(datalib_path+'/prediction_result/result.csv',index=False)
